for i in range(1,10):
    for j in range(1,i+1):
        print(f'''{j}*{i}={i*j}''',end='   ')
    print()

print('===============================================================')

for i in range(1,10):
    for j in range(1,11-i):
        print(f'''{j}*{10-i}={j*(10-i)}''',end='   ')
    print()



# for i in range(9,0,-1):
#     for j in range(9,9-i,-1):
#         print(fr'''{10-j}*{i}={(10-j)*i}''',end='   ')
#     print()